package cn.org.donald.framework.service;

import cn.org.donald.framework.pojo.dto.AddRolePermissionDto;
import cn.org.donald.framework.pojo.dto.TagDto;
import cn.org.donald.framework.pojo.vo.ControllerPermissionVo;
import cn.org.donald.pojo.entity.Permission;
import cn.org.donald.pojo.entity.Role;
import cn.org.donald.pojo.entity.RolePermission;

import java.util.List;

/**
 * @author ： Donald
 * @date ： 2020/10/18 01:41
 * @description：
 */
public interface SysPermissionService {

    List<Permission> findByRoleId(Long roleId);

    int syncApi(List<Permission> pathList, List<TagDto> tagsList);

    List<ControllerPermissionVo> findTree(Long id);

    List<ControllerPermissionVo> findTreeByRoleId(Long id);

    List<ControllerPermissionVo> findTreeNotByRoleId(Long id);

    List<Permission> findByPermissionNameNotIn(List<Permission> permissionList);

    int insertRolePermissionBatch(AddRolePermissionDto addRolePermissionDto);

    List<RolePermission> findRolePermissionByRoleIds(List<Role> roleList);

    int deleteRolePermission(RolePermission rolePermission);
}
